from likeshop.base.mybase import Tools


class login_model(Tools):
    # 定义登录路径
    login_path = '/page/account/login'

    # 发送登录请求
    def login_action(self, user, pwd, types):
        mydata = {
            'account': user,
            'password': pwd,
            'client': types
        }
        res = self.session.post(url=self.hosturl+self.login_path, data=mydata)
        return res.json()
